﻿@model IEnumerable<FlitBit.Dto.ModelBinding.Sample.Models.IPerson>

@{
	ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
	@Html.ActionLink("Create New", "Create")
</p>
<table>
	<tr>
		<th>
			@Html.DisplayNameFor(model => model.Name)
		</th>
		<th>
			@Html.DisplayNameFor(model => model.BirthDate)
		</th>
		<th>
			@Html.DisplayNameFor(model => model.HasBeens)
		</th>
		<th></th>
	</tr>

	@foreach (var item in Model)
	{
		<tr>
			<td>
				@Html.DisplayFor(modelItem => item.Name)
			</td>
			<td>
				@Html.DisplayFor(modelItem => item.BirthDate)
			</td>
			<td>
				@Html.DisplayFor(modelItem => item.HasBeens)
			</td>
			<td>
				@Html.ActionLink("Edit", "Edit", new {id = item.ID}) |
				@Html.ActionLink("Details", "Details", new {id = item.ID}) |
				@Html.ActionLink("Delete", "Delete", new {id = item.ID})
			</td>
		</tr>
	}

</table>
